<%@ page import="edu.uiuc.ncsa.ResponseHandler" %>
<%@ page import="java.io.File" %>
<%--
  @author : Sachith Dhanushka (sachith.dhanushka@gmail.com)
  @date: Jun 4, 2008
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String fileId = request.getParameter("fileId");
    String filePath = (String) getServletConfig().getServletContext().getAttribute(fileId);

    File kmlFile = new File(filePath);
    if (kmlFile.isFile()) {
        ResponseHandler.sendFileToGEarth(kmlFile, response);
    } else {
%>
<html>
<body><h1>Can not find the kml file</h1></body>
</html>
<%
    }

%>